home *** CD-ROM | disk | FTP | other *** search
- VERSION 4.00
- Begin VB.Form frmMinMax
- Caption = "MinMax Sample"
- ClientHeight = 2475
- ClientLeft = 2415
- ClientTop = 3630
- ClientWidth = 5085
- Height = 2880
- Icon = "MinMax.frx":0000
- Left = 2355
- LinkTopic = "Form1"
- ScaleHeight = 2475
- ScaleWidth = 5085
- Top = 3285
- Width = 5205
- Begin VB.Label Label4
- BackStyle = 0 'Transparent
- Caption = "e-mail:"
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "MS Sans Serif"
- Size = 8.25
- Charset = 177
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 210
- Left = 60
- TabIndex = 3
- Top = 1080
- Width = 510
- End
- Begin VB.Label Label1
- Caption = $"MinMax.frx":0442
- Height = 675
- Left = 60
- TabIndex = 2
- Top = 60
- Width = 4965
- End
- Begin VB.Label lblMailTo
- BackStyle = 0 'Transparent
- Caption = "alexw@netvision.net.il"
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "MS Sans Serif"
- Size = 8.25
- Charset = 177
- Weight = 400
- Underline = -1 'True
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H8000000D&
- Height = 240
- Left = 570
- MouseIcon = "MinMax.frx":04DD
- MousePointer = 99 'Custom
- TabIndex = 1
- Top = 1050
- Width = 1875
- End
- Begin VB.Label Label2
- BackStyle = 0 'Transparent
- Caption = "Copyright
- 1998, Alex Wainstein"
- Height = 240
- Left = 30
- TabIndex = 0
- Top = 780
- Width = 3210
- End
- Begin MSGHOOKLibCtl.MsgHook MsgHook1
- Left = 2730
- OleObjectBlob = "MinMax.frx":062F
- Top = 1290
- End
- Attribute VB_Name = "frmMinMax"
- Attribute VB_Creatable = False
- Attribute VB_Exposed = False
- Option Explicit
- Private Sub Form_Load()
- MsgHook1.hwnd = hwnd
- MsgHook1.AddMessage WM_GETMINMAXINFO, mshEatMessage
- End Sub
- Private Sub Form_GetMinMaxInfo(ByVal MinMaxInfoAddress As Long)
- Dim MinMax As MINMAXINFO
- ' Copy to VB inrinsic variable
- CopyMemory MinMax, ByVal MinMaxInfoAddress, Len(MinMax)
- ' Set dimensions
- MinMax.ptMinTrackSize.x = Screen.Width \ Screen.TwipsPerPixelX \ 4
- MinMax.ptMinTrackSize.y = 3480 \ Screen.TwipsPerPixelY \ 2
- MinMax.ptMaxTrackSize.x = Screen.Width \ Screen.TwipsPerPixelX \ 2
- MinMax.ptMaxTrackSize.y = 3480 \ Screen.TwipsPerPixelY
- ' Copy back to where Windows expects to get the information
- CopyMemory ByVal MinMaxInfoAddress, MinMax, Len(MinMax)
- End Sub
- Private Sub lblMailTo_Click()
- Dim res As Long
- Dim lpOperation As String
- Dim lpFile As String
- Dim lpParameters As String
- Dim lpDirectory As String
- Dim nShowCmd As Long
- lpOperation = "open"
- lpFile = "MAILTO:" + lblMailTo
- nShowCmd = vbNormalFocus
- res = ShellExecute(hwnd, lpOperation, lpFile, lpParameters, ByVal lpDirectory, nShowCmd)
- End Sub
- Private Sub MsgHook1_Message(ByVal MsgId As Long, ByVal wParam As Long, ByVal lParam As Long, ByVal MsgProcessing As Integer, MsgResult As Long)
- Select Case MsgId
- Case WM_GETMINMAXINFO:
- Form_GetMinMaxInfo lParam
- End Select
- End Sub
-